const express = require('express');
const router = express.Router();
const promotionController = require('../controllers/promotionController');
const { authMiddleware } = require('../middleware/auth');

// 所有路由都需要验证token
router.use(authMiddleware);

// 获取促销设置
router.get('/promotion-settings', promotionController.getPromotionSettings);

// 保存促销设置
router.post('/promotion-settings', promotionController.savePromotionSettings);

// 获取商品渠道价格
router.get('/product-channel-prices', promotionController.getProductChannelPrices);

// 更新商品渠道价格
router.post('/product-channel-price', promotionController.updateProductChannelPrice);

module.exports = router; 